import pylab as pl
import numpy as np
import matplotlib.pyplot as plt
from scipy import stats

n = 10
k = np.arange(n + 1)
pcoin = stats.binom.pmf(k, n, 0.5)
pcoin2 = stats.binom.pmf(k, n, 0.7)

# pl.stem(k, pcoin, basefmt="k-",bottom=0,label=None,use_line_collection=True)
# pl.margins(0.1)
plt.plot(k,pcoin)
plt.plot(k,pcoin2)

plt.show()